ostree.git
11 years agoRemove unused variable warning
Giuseppe Scrivano [Thu, 11 Dec 2014 09:41:52 +0000 (10:41 +0100)]
Remove unused variable warning

11 years agofix --help for static-delta
Giuseppe Scrivano [Thu, 30 Oct 2014 13:23:34 +0000 (14:23 +0100)]
fix --help for static-delta

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agotest-rollsum: Process all input, print more statistics
Colin Walters [Tue, 24 Jun 2014 11:58:13 +0000 (07:58 -0400)]
test-rollsum: Process all input, print more statistics

Copying the bup code, we need to loop over all chunks even after
hitting the rollsum returning 0.

Also print more statistics.

11 years agoStatic deltas support
Colin Walters [Sun, 9 Feb 2014 21:11:37 +0000 (16:11 -0500)]
Static deltas support

https://bugzilla.gnome.org/show_bug.cgi?id=721799

11 years agoRevert "ostree-repo-pull: Remove currently #if 0 static delta code"
Giuseppe Scrivano [Tue, 11 Nov 2014 09:36:37 +0000 (10:36 +0100)]
Revert "ostree-repo-pull: Remove currently #if 0 static delta code"

This reverts commit 1c2e20af25b21abc0dee1547a0d5bad1a21c0b58.

11 years agodoc: Update gtk-docs
Matthew Barnes [Thu, 18 Dec 2014 00:20:17 +0000 (19:20 -0500)]
doc: Update gtk-docs

11 years agoAdd "ostree remote list" command
Matthew Barnes [Tue, 16 Dec 2014 15:41:34 +0000 (10:41 -0500)]
Add "ostree remote list" command

Lists available remote names.

11 years agoAdd ostree_repo_remote_list()
Matthew Barnes [Tue, 16 Dec 2014 15:29:09 +0000 (10:29 -0500)]
Add ostree_repo_remote_list()

Lists available remote names.

11 years agoRelease 2014.13
Colin Walters [Wed, 17 Dec 2014 16:35:52 +0000 (11:35 -0500)]
Release 2014.13

11 years agobasic-test: Fixup mtime check for bare-user
Colin Walters [Wed, 17 Dec 2014 16:34:10 +0000 (11:34 -0500)]
basic-test: Fixup mtime check for bare-user

https://bugzilla.gnome.org/show_bug.cgi?id=741662

11 years agotests: Fix two bugs in tests revealed by new remote changes
Colin Walters [Wed, 17 Dec 2014 15:43:01 +0000 (10:43 -0500)]
tests: Fix two bugs in tests revealed by new remote changes

11 years agoAdd more flexible _remote_change() API , expose via 'ostree remote'
Colin Walters [Mon, 15 Dec 2014 21:21:15 +0000 (16:21 -0500)]
Add more flexible _remote_change() API , expose via 'ostree remote'

For Anaconda, I needed OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS,
with the GFile *sysroot argument to avoid ugly hacks.  We want to
write the content provided via "ostreesetup" as a remote to the target
chroot only in the case where it isn't provided as part of the tree
content itself.

This is also potentially useful in idempotent systems management tools
like Ansible.

https://bugzilla.gnome.org/show_bug.cgi?id=741577

11 years agorepo: (cleanup) Use _is_system() rather than inlining it
Colin Walters [Mon, 15 Dec 2014 18:59:46 +0000 (13:59 -0500)]
repo: (cleanup) Use _is_system() rather than inlining it

No reason to duplicate the code.

11 years agoImprove "ostree remote" help output
Matthew Barnes [Thu, 4 Dec 2014 18:37:26 +0000 (13:37 -0500)]
Improve "ostree remote" help output

Must have glossed over these because the commands are so simple.

 - List subcommands for "ostree remote --help".

 - Only show options relevant to COMMAND for
   "ostree remote COMMAND --help".

11 years agotrivial-httpd: use PR_SET_PDEATHSIG by default
Colin Walters [Mon, 8 Dec 2014 19:44:44 +0000 (14:44 -0500)]
trivial-httpd: use PR_SET_PDEATHSIG by default

If we're not daemonizing, this is a useful way to ensure we go away if
our parent does.

https://bugzilla.gnome.org/show_bug.cgi?id=741264

11 years agotest-local-pull: Sort find output to make test robust
Alexander Larsson [Mon, 8 Dec 2014 19:26:58 +0000 (20:26 +0100)]
test-local-pull: Sort find output to make test robust

There is no guarantee that find will produce output in the same
order, so we need to sort the output to ensure we always
get the same output.

https://bugzilla.gnome.org/show_bug.cgi?id=741125

11 years agorepo: Add private functions to access remote options
Matthew Barnes [Thu, 4 Dec 2014 20:38:36 +0000 (15:38 -0500)]
repo: Add private functions to access remote options

ostree_repo_pull_with_options() needs this, and I'd rather keep the
OstreeRemote struct definition tucked away in ostree-repo.c with its
own internal API.

11 years agorepo: Add ostree_repo_remote_get_url()
Matthew Barnes [Thu, 4 Dec 2014 00:46:03 +0000 (19:46 -0500)]
repo: Add ostree_repo_remote_get_url()

Peeking at remote details by way of ostree_repo_copy_config() doesn't
work anymore.

11 years agorepo: Add an internal struct to manage remotes
Matthew Barnes [Wed, 3 Dec 2014 23:58:16 +0000 (18:58 -0500)]
repo: Add an internal struct to manage remotes

OstreeRemote is a reference-counted struct that encompasses data about a
remote, whether read from a configuration file or created explicitly via
ostree_repo_remote_add().

OstreeRemotes are held in an internal table indexed by remote name.
This solves some problems caused by merging system-wide remote data into
the OstreeRepo's internal config key file.

Also fixes https://bugzilla.gnome.org/show_bug.cgi?id=740911

11 years agolibotutil: Add ot_keyfile_copy_group()
Matthew Barnes [Wed, 3 Dec 2014 22:16:48 +0000 (17:16 -0500)]
libotutil: Add ot_keyfile_copy_group()

Copies all the keys of a group from one GKeyFile to another.

11 years agoAdd local-pull archive-z2 <=> bare-user roundtrip test
Alexander Larsson [Mon, 8 Dec 2014 11:00:59 +0000 (12:00 +0100)]
Add local-pull archive-z2 <=> bare-user roundtrip test

This creates a archive-z2 repo, pull-locals it to bare-user and then
again back to archive-z2 making sure things fsck along the way.
Then it checks out all repos and makes sure each one reproduces
the same result.

Unfortunately we can't install this as a real test because
it doesn't work in the test-runner because tmpfs doesn't support
user xattrs.

https://bugzilla.gnome.org/show_bug.cgi?id=741125

11 years agoAdd test-basic-user.sh testing for bare-user repos
Alexander Larsson [Fri, 5 Dec 2014 13:40:15 +0000 (14:40 +0100)]
Add test-basic-user.sh testing for bare-user repos

This just does whatever test-basic.sh does, but on a bare-user
repo.

This works standalone, but unfortunately it breaks in
gnome-desktop-testing-runner as /tmp doesn't support
xattrs, so it is not installed atm.

https://bugzilla.gnome.org/show_bug.cgi?id=741125

11 years agoSplit out basic tests from test-basic.sh
Alexander Larsson [Fri, 5 Dec 2014 13:28:16 +0000 (14:28 +0100)]
Split out basic tests from test-basic.sh

This will let us reuse them with other repo types

https://bugzilla.gnome.org/show_bug.cgi?id=741125

11 years agoSupport for "bare-user" repo format
Alexander Larsson [Thu, 4 Dec 2014 10:11:58 +0000 (11:11 +0100)]
Support for "bare-user" repo format

This format is pretty much the same as the "bare" format, except the
file ownership and xattrs is not stored in the actual filesystem object, but
rather on the side in a user xattr. This means two things:

1) An unprivileged user can store such a repo independent of the types
   of files in it or their xattrs. And you can later (as root)
   reconstruct the real filesystem tree with ownership. Although you
   can't do that using hardlink-sharing. This also means ostree
   fsck does a full verification.

2) Such a repository can be checked out with user-mode (checkout -U)
   as an unprivileged user using hardlinks for space sharing.

Additionally, symlinks are stored as regular files (with the content
being the symlink target) because user xattrs are not supported on
symlinks. We know at checkout time if the file is a symlink because
the original st_mode is stored in the xattr metadata.

https://bugzilla.gnome.org/show_bug.cgi?id=741125

11 years agoAdd ot_lgetxattrat and ot_lsetxattrat utils
Alexander Larsson [Wed, 3 Dec 2014 09:58:41 +0000 (10:58 +0100)]
Add ot_lgetxattrat and ot_lsetxattrat utils

These are implementation of the missing corresponding syscalls that
are done with the /proc/self/fd mechanism described at:

https://mail.gnome.org/archives/ostree-list/2014-February/msg00017.html

https://bugzilla.gnome.org/show_bug.cgi?id=741125

11 years agoREADME.md: Add a quick blurb on style
Colin Walters [Sun, 7 Dec 2014 22:19:42 +0000 (17:19 -0500)]
README.md: Add a quick blurb on style

11 years agounion checkout: Fix symlink handling for xattrs
Alexander Larsson [Fri, 5 Dec 2014 12:46:58 +0000 (13:46 +0100)]
union checkout: Fix symlink handling for xattrs

Applying xattrs on a symlink during checkout failed since
it was setting the xattrs on the final filename, not the
temporary name.

This made the "checkout union 1" test in test-basic.sh
fail.

https://bugzilla.gnome.org/show_bug.cgi?id=741125

11 years agocheckout: fchown symlink to proper uid/gid
Alexander Larsson [Thu, 4 Dec 2014 19:19:09 +0000 (20:19 +0100)]
checkout: fchown symlink to proper uid/gid

When commiting a symlink we do store the uid/gid of the actual
symlink (i.e. not target). However, this was not restored
on non-user-mode checkout as it should.

This commit fixes that, and additionally it ensures xattrs
on symlinks are not set in user-mode checkout.

https://bugzilla.gnome.org/show_bug.cgi?id=741125

11 years agodeploy: Ensure that we can deploy using only /usr/lib/ostree-boot
Colin Walters [Mon, 1 Dec 2014 03:50:02 +0000 (22:50 -0500)]
deploy: Ensure that we can deploy using only /usr/lib/ostree-boot

rpm-ostree at least has the option to generate a tree with just that
instead of /boot, but while we were enumerating the latter, we'd still
return paths from /boot.

https://bugzilla.gnome.org/show_bug.cgi?id=740947

11 years agodocs: Add verbose option to manual
Kenjiro Nakayama [Tue, 25 Nov 2014 13:25:15 +0000 (22:25 +0900)]
docs: Add verbose option to manual

11 years agoREADME.md: Mention patches and test suite
Colin Walters [Sun, 30 Nov 2014 18:23:06 +0000 (13:23 -0500)]
README.md: Mention patches and test suite

11 years agodocs: Fix a pile of Docbook validation errors
Colin Walters [Sat, 29 Nov 2014 17:15:21 +0000 (12:15 -0500)]
docs: Fix a pile of Docbook validation errors

At least now validates with RNG mode in Emacs.

11 years agoRelease 2014.12
Colin Walters [Wed, 26 Nov 2014 16:56:10 +0000 (11:56 -0500)]
Release 2014.12

11 years agotests: Fix u-boot test failure
Colin Walters [Tue, 25 Nov 2014 20:21:11 +0000 (15:21 -0500)]
tests: Fix u-boot test failure

This bit needs to be specific to syslinux.

11 years agotrivial: Fix typo in previous commit
Colin Walters [Tue, 25 Nov 2014 18:47:54 +0000 (13:47 -0500)]
trivial: Fix typo in previous commit

11 years agogrub2: If using --sysroot, run in chroot
Colin Walters [Fri, 21 Nov 2014 16:37:25 +0000 (11:37 -0500)]
grub2: If using --sysroot, run in chroot

In Anaconda, we're using "ostree admin --sysroot=/mnt/sysimage
instutil set-kargs", and it was working before, but newer versions of
lorax strip out /etc/system-release which grub2 wants.

That was wrong anyways as we want the /etc/system-release from the
target root.

(Man, grub2 sucks...give me a declarative config file format I can just
 write)

https://bugzilla.gnome.org/show_bug.cgi?id=740697

11 years agoRefactor command-line parsing
Matthew Barnes [Fri, 14 Nov 2014 19:00:13 +0000 (14:00 -0500)]
Refactor command-line parsing

Refactor command-line parsing to better utilize GOptionContext.  This
eliminates most of the manual parsing and global options are now shown
in the help output.

Here's a sample:

    $ ostree admin --help
    Usage:
      ostree admin [OPTION...] --print-current-dir|COMMAND

    Builtin "admin" Commands:
      cleanup
      config-diff
      deploy
      init-fs
      instutil
      os-init
      status
      switch
      undeploy
      upgrade

    Help Options:
      -h, --help         Show help options

    Application Options:
      --sysroot=PATH     Create a new OSTree sysroot at PATH
      -v, --verbose      Print debug information during command processing
      --version          Print version information and exit

https://bugzilla.gnome.org/show_bug.cgi?id=740295

11 years agoVarious manpage / usage blurb improvements
Matthew Barnes [Tue, 11 Nov 2014 02:28:43 +0000 (21:28 -0500)]
Various manpage / usage blurb improvements

Corrections, clarifications, consistency.

Not a comprehensive overhaul of the manpages; they do still need work.
These are just flaws I've noted while studying the ostree command syntax.

https://bugzilla.gnome.org/show_bug.cgi?id=740097

11 years agoostree-fetcher: move more logic into ostree_fetcher_request_uri_internal
Giuseppe Scrivano [Tue, 11 Nov 2014 10:24:43 +0000 (11:24 +0100)]
ostree-fetcher: move more logic into ostree_fetcher_request_uri_internal

Make _ostree_fetcher_request_uri_with_partial_async and
ostree_fetcher_stream_uri_async simple wrapper around the same
function, all the requests are created in the same place now.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoostree-fetcher: make _ostree_fetcher_stream_uri_sync private
Giuseppe Scrivano [Wed, 5 Nov 2014 08:48:12 +0000 (09:48 +0100)]
ostree-fetcher: make _ostree_fetcher_stream_uri_sync private

Rename _ostree_fetcher_contents_membuf_sync to
ostree_fetcher_request_uri_to_membuf and drop unused argument
user_data.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoostree-fetcher: Remove _ostree_fetcher_request_uri_to_stream function
Giuseppe Scrivano [Thu, 6 Nov 2014 13:57:25 +0000 (14:57 +0100)]
ostree-fetcher: Remove _ostree_fetcher_request_uri_to_stream function

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoostree-metalink: use _ostree_fetcher_contents_membuf_sync
Giuseppe Scrivano [Thu, 6 Nov 2014 12:37:30 +0000 (13:37 +0100)]
ostree-metalink: use _ostree_fetcher_contents_membuf_sync

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoostree-fetcher: add max_size argument to change _ostree_metalink_request_sync
Giuseppe Scrivano [Thu, 6 Nov 2014 13:53:52 +0000 (14:53 +0100)]
ostree-fetcher: add max_size argument to change _ostree_metalink_request_sync

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoostree-fetcher: remove two unused functions
Giuseppe Scrivano [Wed, 5 Nov 2014 10:48:10 +0000 (11:48 +0100)]
ostree-fetcher: remove two unused functions

_ostree_fetcher_query_state_text() and_ostree_fetcher_get_n_requests()
have no callers, so remove them.

If they will be needed, they can be easily copied back from the git
history.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agometalink: have a single entry to the metalink module
Giuseppe Scrivano [Tue, 4 Nov 2014 16:33:41 +0000 (17:33 +0100)]
metalink: have a single entry to the metalink module

Replace _ostree_metalink_request_async with a synchronous version.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoostree_fetcher: new function _ostree_fetcher_contents_membuf_sync
Giuseppe Scrivano [Mon, 3 Nov 2014 15:53:19 +0000 (16:53 +0100)]
ostree_fetcher: new function _ostree_fetcher_contents_membuf_sync

Move code from ostree-repo-pull.c

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agosyslinux: Adapt to bootloader UI changes
Matthew Barnes [Mon, 10 Nov 2014 00:54:37 +0000 (19:54 -0500)]
syslinux: Adapt to bootloader UI changes

This was a side-effect of the bootloader UI changes in bug 739416,
but should now be sufficiently future-proofed with code comments.

11 years agotests: fix intermittent failure for test-sysroot
Giuseppe Scrivano [Mon, 10 Nov 2014 18:48:45 +0000 (19:48 +0100)]
tests: fix intermittent failure for test-sysroot

libtestExec doesn't run twice the same process now.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoostree-repo-pull: Remove currently #if 0 static delta code
Giuseppe Scrivano [Tue, 4 Nov 2014 18:24:27 +0000 (19:24 +0100)]
ostree-repo-pull: Remove currently #if 0 static delta code

We can readd this in the static deltas work.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoadmin-test: Fix two typos in bootloader UI change
Colin Walters [Thu, 6 Nov 2014 23:17:52 +0000 (18:17 -0500)]
admin-test: Fix two typos in bootloader UI change

Based on a patch from Giuseppe Scrivano <gscrivan@redhat.com>

11 years agorepo: Remove unused remote-cache dir
Matthew Barnes [Thu, 6 Nov 2014 18:05:01 +0000 (13:05 -0500)]
repo: Remove unused remote-cache dir

Unused leftover from when ostree had pack files; minor cleanup.

https://bugzilla.gnome.org/show_bug.cgi?id=739746

11 years agoFix GFile leak in ostree_repo_constructed()
Matthew Barnes [Wed, 5 Nov 2014 20:39:48 +0000 (15:39 -0500)]
Fix GFile leak in ostree_repo_constructed()

11 years agobuild: Distribute grub2-15_ostree
Matthew Barnes [Tue, 4 Nov 2014 15:10:31 +0000 (10:10 -0500)]
build: Distribute grub2-15_ostree

11 years agocommit: Split out file processing into helper function
Colin Walters [Fri, 10 Oct 2014 17:35:05 +0000 (13:35 -0400)]
commit: Split out file processing into helper function

There should be no logic change here, just reducing indentation.

11 years agolibostree: Reformat bootloader titles
Matthew Barnes [Thu, 30 Oct 2014 17:44:26 +0000 (13:44 -0400)]
libostree: Reformat bootloader titles

Use the pattern:

  $PRETTY_NAME [$COMMIT_VERSION] (ostree[:$OSNAME][:$DEPLOYMENT_INDEX])

$OSNAME is only shown if there are multiple values.

$COMMIT_VERSION refers to the version tag in the commit's metadata.

$DEPLOYMENT_INDEX is only shown if no $COMMIT_VERSION is available.

https://bugzilla.gnome.org/show_bug.cgi?id=739416

11 years agoRelease 2014.11
Colin Walters [Thu, 30 Oct 2014 18:16:03 +0000 (14:16 -0400)]
Release 2014.11

11 years agodiff: Use gs_unref_object not gs_free on a GFile
Giuseppe Scrivano [Thu, 30 Oct 2014 10:05:47 +0000 (11:05 +0100)]
diff: Use gs_unref_object not gs_free on a GFile

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agopull: Fix a used before initialization warning
Giuseppe Scrivano [Thu, 30 Oct 2014 09:59:30 +0000 (10:59 +0100)]
pull: Fix a used before initialization warning

src/libostree/ostree-repo-pull.c:1676:22: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoostree-repo-pull: Fix inverted assert condition for maxdepth
Giuseppe Scrivano [Thu, 30 Oct 2014 09:58:50 +0000 (10:58 +0100)]
ostree-repo-pull: Fix inverted assert condition for maxdepth

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoRelease 2014.10
Colin Walters [Wed, 29 Oct 2014 18:05:59 +0000 (14:05 -0400)]
Release 2014.10

11 years agopull: Add depth support
Colin Walters [Mon, 27 Oct 2014 02:46:57 +0000 (22:46 -0400)]
pull: Add depth support

For mirroring in particular, we really want to be able to traverse
all history.

$ ostree --repo=repo pull --mirror --depth=-1

https://bugzilla.gnome.org/show_bug.cgi?id=739240

11 years agolibostree: Add ostree_repo_pull_with_options()
Colin Walters [Fri, 24 Oct 2014 02:01:33 +0000 (22:01 -0400)]
libostree: Add ostree_repo_pull_with_options()

We potentially need a lot of argument types for pull.  Rather than
have a C function with tons of arguments, let's use a GVariant a{sv}
as a handy extensible (and immutable) bag of properties.

This is prepratory work for adding an option to pull to traverse
history.

https://bugzilla.gnome.org/show_bug.cgi?id=737844

11 years agogrub2: Fix bad substitution in review followup
Colin Walters [Mon, 27 Oct 2014 16:19:32 +0000 (12:19 -0400)]
grub2: Fix bad substitution in review followup

This caused GRUB2+EFI installations to fail.

11 years agoRelease 2014.9
Colin Walters [Fri, 24 Oct 2014 17:33:49 +0000 (13:33 -0400)]
Release 2014.9

11 years agocheckout: permit checkout of a single file
Giuseppe Scrivano [Thu, 23 Oct 2014 13:38:44 +0000 (15:38 +0200)]
checkout: permit checkout of a single file

fixes a coredump when using a command like:

$ ostree --repo=repo checkout -U --subpath=/usr/lib/passwd \
  fedora-atomic/rawhide/x86_64/docker-host usrlib-new

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoAdd (non-atomic) support for GRUB2 + UEFI
Colin Walters [Fri, 17 Oct 2014 15:46:52 +0000 (11:46 -0400)]
Add (non-atomic) support for GRUB2 + UEFI

We need basic support for UEFI - many newer servers don't support
BIOS compatibility mode anymore.

However, this patch only implements non-atomic because UEFI is FAT, and
we can't do the previous design for OSTree of atomic swap of
/boot/loader.

The Fedora/RHEL UEFI layout has the kernels on a "real" /boot
partition, and /boot/efi/EFI/$vendor just holds the grub2 UEFI binary
and grub.cfg.

Following this, /boot/loader is still on the OS boot partition, and we
still atomically swap it.  This potentially paves the way to atomic
upgrades in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=724246

11 years agotests: Add some versioning metadata and test it appears in status output
Colin Walters [Wed, 22 Oct 2014 15:07:44 +0000 (11:07 -0400)]
tests: Add some versioning metadata and test it appears in status output

Followup to previous commits.

11 years agoadmin status: Print the version
James Antill [Wed, 22 Oct 2014 05:59:36 +0000 (01:59 -0400)]
admin status: Print the version

11 years agodump: Print the version when dumping a commit, log/show/etc.
James Antill [Wed, 22 Oct 2014 05:23:49 +0000 (01:23 -0400)]
dump: Print the version when dumping a commit, log/show/etc.

11 years agoadmin: Add ot_admin_checksum_version to get a dup of the version for a commit
James Antill [Wed, 22 Oct 2014 05:21:14 +0000 (01:21 -0400)]
admin: Add ot_admin_checksum_version to get a dup of the version for a commit

11 years agocorrupt-repo-ref.js: more aggressive file corruption
Giuseppe Scrivano [Wed, 22 Oct 2014 17:52:12 +0000 (19:52 +0200)]
corrupt-repo-ref.js: more aggressive file corruption

changing only a byte may not generate a corrupted file, so play very
safe and change 10 bytes.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agofsck: report the correct error when a present file cannot be loaded
Giuseppe Scrivano [Wed, 22 Oct 2014 16:06:29 +0000 (18:06 +0200)]
fsck: report the correct error when a present file cannot be loaded

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agotests: test-admin-deploy-switch doesn't use deprecated "current" symlink
Giuseppe Scrivano [Tue, 21 Oct 2014 19:08:15 +0000 (21:08 +0200)]
tests: test-admin-deploy-switch doesn't use deprecated "current" symlink

commit dfeb27eca55d923c57735e491e438ae54f8cc201 removed it, so change
the test to not use it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agotests: fix --help test
Giuseppe Scrivano [Tue, 21 Oct 2014 14:20:58 +0000 (16:20 +0200)]
tests: fix --help test

Check for "Usage" only in the root command, builtins may not output
it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agomake ostree_cmd__private__ ret value const
Giuseppe Scrivano [Tue, 21 Oct 2014 09:22:51 +0000 (11:22 +0200)]
make ostree_cmd__private__ ret value const

11 years agorepo: When writing to a non-root owned repo, chown() objects to match
Colin Walters [Tue, 21 Oct 2014 18:34:04 +0000 (14:34 -0400)]
repo: When writing to a non-root owned repo, chown() objects to match

Some package systems need to be run as root, so the process linking to
libostree may also be root.  However, it's reasonable to have the
target repository be owned by a uid other than root.

This patch makes it Just Work by chowning the file content to match.

Note this only operates on archive-z2 repositories, because you can't
usefully serve bare repositories via HTTP.

https://bugzilla.gnome.org/show_bug.cgi?id=738954

11 years agobuild: Include SELinux cflags with libostree build too
Matthew Barnes [Mon, 20 Oct 2014 15:06:51 +0000 (11:06 -0400)]
build: Include SELinux cflags with libostree build too

This is likely another issue with newer automake.

https://bugzilla.gnome.org/738875

11 years agoAdd "ostree remote delete" and corresponding API
Colin Walters [Fri, 17 Oct 2014 15:47:01 +0000 (11:47 -0400)]
Add "ostree remote delete" and corresponding API

For Anaconda, we have an ugly bootstrapping problem where we need to
add the remote to the repository's config, then do a pull+deploy, then
remove and re-add the config, because /etc/ostree/remotes.d doesn't
exist yet in the target system.

https://bugzilla.gnome.org/show_bug.cgi?id=738698

11 years agoRelease 2014.8
Colin Walters [Thu, 16 Oct 2014 20:54:55 +0000 (16:54 -0400)]
Release 2014.8

11 years agorepo: Disable uncompressed object cache on non-writable repos
Colin Walters [Thu, 16 Oct 2014 18:54:34 +0000 (14:54 -0400)]
repo: Disable uncompressed object cache on non-writable repos

While we did support disabling the uncompressed-objects-cache
per-repository:

1) We didn't actually respect that operation when doing
   CHECKOUT_MODE_USER on archive-z2 repositories
2) It'd be better to automatically detect we can't write to the
   repo and disable the uncompressed cache then.

11 years agolibostree: Add initial GRUB2 support
Colin Walters [Sat, 11 Oct 2014 12:59:06 +0000 (08:59 -0400)]
libostree: Add initial GRUB2 support

In this approach, we drop a /etc/grub.d/15_ostree file which is a
hybrid of shell/C that picks up bits from the GRUB2 library (e.g. the
block device script generation), and then calls into libostree's
GRUB2 code which knows about the BLS entries.

This is admittedly ugly.  There exists another approach for GRUB2 to
learn the BLS specification.  However, the spec has a few issues:

https://www.redhat.com/archives/anaconda-devel-list/2014-July/msg00002.html

This approach also gives a bit more control to the admin via the
naming of the 15_ostree symlink; they can easily disable it:

Or reorder the ostree entries ahead of 10_linux:

Also, this approach doesn't require patches for grub2, which is an
issue with the pressure to backport (rpm-)OSTree to EL7.

11 years agohttp: set the HTTP status on directory listing
Giuseppe Scrivano [Tue, 7 Oct 2014 11:10:08 +0000 (13:10 +0200)]
http: set the HTTP status on directory listing

Fix a HTTP response header like the following:

HTTP/1.1 0 (null)
Server: ostree-httpd libsoup/2.48.0
Date: Tue, 07 Oct 2014 11:19:22 GMT
Content-Type: text/html
Content-Length: 12533

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agotests: do not leave running httpd after tests exit
Giuseppe Scrivano [Tue, 7 Oct 2014 10:05:59 +0000 (12:05 +0200)]
tests: do not leave running httpd after tests exit

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agotrivial-httpd: Another followup fix - need to listen on all interfaces
Colin Walters [Mon, 6 Oct 2014 21:43:02 +0000 (17:43 -0400)]
trivial-httpd: Another followup fix - need to listen on all interfaces

This was the intended design, but it regressed when updating.

11 years agolibostree: fix a gobject-introspection warning
Giuseppe Scrivano [Mon, 6 Oct 2014 16:54:18 +0000 (18:54 +0200)]
libostree: fix a gobject-introspection warning

src/libostree/ostree-repo.c:1759: Warning: OSTree:
  ostree_repo_import_object_from: unknown parameter 'checksum' in
  documentation comment, should be 'sha256'

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
11 years agoRelease 2014.7
Colin Walters [Fri, 3 Oct 2014 23:10:13 +0000 (19:10 -0400)]
Release 2014.7

11 years agoAdd missing file from previous commit
Colin Walters [Fri, 3 Oct 2014 18:38:30 +0000 (14:38 -0400)]
Add missing file from previous commit

11 years agoAdd "unconfigured-state" concept to origin files
Colin Walters [Tue, 30 Sep 2014 22:12:08 +0000 (18:12 -0400)]
Add "unconfigured-state" concept to origin files

Some operating systems may come with external tools for subscription
management that drive access to the content.  In that case, the origin
file may not be useful (for example, it could refer to an installer
ISO).

This patch will allow OS installers to inject that state, with a
useful error message, directing the system administrator to an
external tool.

See: https://github.com/projectatomic/rpm-ostree/issues/31

https://bugzilla.gnome.org/show_bug.cgi?id=737686

11 years agopull: Support full recursive mirrors of repositories with summary file
Colin Walters [Thu, 2 Oct 2014 21:49:26 +0000 (17:49 -0400)]
pull: Support full recursive mirrors of repositories with summary file

Now that we have a summary file, we can use it to allow a simple:

ostree pull --mirror

To download the latest commit on every branch.  Also, for a case I'm
dealing with there's only one branch, but I don't want mirror users to
have to hardcode it.

https://bugzilla.gnome.org/show_bug.cgi?id=737807

11 years agoAdd API to directly link() objects between repositories
Colin Walters [Thu, 2 Oct 2014 03:19:31 +0000 (23:19 -0400)]
Add API to directly link() objects between repositories

And use it in pull-local.  As one might expect, this is blazingly fast
if they're on the same filesystem.

I'll be using this to "promote" builds between different repositories.

11 years agoupgrader: Hold a ref to the origin
Colin Walters [Tue, 30 Sep 2014 14:22:57 +0000 (10:22 -0400)]
upgrader: Hold a ref to the origin

We unref it in _finalize, so we need to hold a ref.  I *thought*
this was the source of
https://github.com/projectatomic/rpm-ostree/issues/30

But apparently not =/

11 years agoTest 'ostree admin --print-current-dir'
Owen W. Taylor [Fri, 26 Sep 2014 15:54:04 +0000 (11:54 -0400)]
Test 'ostree admin --print-current-dir'

Add a test for the --print-current-dir option

https://bugzilla.gnome.org/show_bug.cgi?id=731051

11 years agoAdd test case for 'admin instutil set-kargs'
Owen W. Taylor [Fri, 26 Sep 2014 15:43:46 +0000 (11:43 -0400)]
Add test case for 'admin instutil set-kargs'

Test out the newly added options to 'instutil set-kargs' along with
the existing functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=731051

11 years agoostree admin: Add a --print-current-dir option
Owen W. Taylor [Tue, 23 Sep 2014 15:32:44 +0000 (11:32 -0400)]
ostree admin: Add a --print-current-dir option

Add an option --print-current-dir that prints the current deployment
directory to stdout and exits.

https://bugzilla.gnome.org/show_bug.cgi?id=731051

11 years agoostree admin instutil set-kargs: make more flexible
Owen W. Taylor [Tue, 23 Sep 2014 15:16:53 +0000 (11:16 -0400)]
ostree admin instutil set-kargs: make more flexible

Add command line arguments:
 --import-proc-cmdline: import values from /proc/cmdline
 --merge: import current values
 --replace=ARG=VALUE: replace value
 --append=ARG=VALUE: append a new argument

Extra command line arguments are treated like --append=, which
gives backwards compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=731051

11 years agotrivial-httpd: Further fixes for previous commit
Colin Walters [Thu, 25 Sep 2014 20:03:06 +0000 (16:03 -0400)]
trivial-httpd: Further fixes for previous commit

11 years agoFollowup to SoupServer port deprecation
Colin Walters [Thu, 25 Sep 2014 19:57:58 +0000 (15:57 -0400)]
Followup to SoupServer port deprecation

My patch didn't actually work with newer libsoup.

11 years agoAdd test for the behavior of --help
Owen W. Taylor [Thu, 25 Sep 2014 07:05:45 +0000 (03:05 -0400)]
Add test for the behavior of --help

Recursive over ostree and all subcommands, and check that --help
is supported, properly outputs to standard out, and exits
with a 0 exit status. Check that for commands with subcommands,
they produce the help output to standard error when run with no arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=737194

11 years ago--help should always go to stdout
Owen W. Taylor [Thu, 25 Sep 2014 06:34:30 +0000 (02:34 -0400)]
--help should always go to stdout

The standard convention is that the  output of --help should go to standard
output (so that it can be piped to a pager and searched.) See, e.g., the
GNU coding standards.

https://bugzilla.gnome.org/show_bug.cgi?id=737194

11 years agoostree admin instutil: make --help work for subcommands
Owen W. Taylor [Wed, 24 Sep 2014 13:23:56 +0000 (09:23 -0400)]
ostree admin instutil: make --help work for subcommands

Even though the subcommands don't take arguments, use a GOptionContext
so that --help works as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=737194